﻿/*---------------------------------------------------------------- 
// Copyright 2005-2016 My Tech. Co. Ltd. All Rights Reserved.
// 版权所有。  
// 
// 文件名： CradleHeadBll
// 文件功能描述： 
// 
//  
// 创建标识： wx2016/11/11 16:38:35
// 
// 修改标识： 
// 修改描述： 
//----------------------------------------------------------------*/

using MyBLL.Dto;
using MyDAL.DAL.Dto.DeviceDto;
using MyMiddleware;
using MyTool;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MyBLL
{
    public class NETCameraBll
    {
        private static Device device;

        /// <summary>
        /// 登录相机
        /// </summary>
        /// <param name="device"></param>
        /// <returns></returns>
        public static bool Login(Device device)
        {
            bool connectBl = device.GetDataByCommand("login");
            return connectBl;
        }

        /// <summary>
        /// 使用提供的设备和显示控件句柄执行实时显示操作
        /// </summary>
        /// <param name="device"></param>
        /// <param name="hwnd"></param>
        public static void Show(Device device,IntPtr hwnd)
        {
            device.Handle = hwnd;
            device.GetDataByCommand("begin");
        }

        public static bool Up(Device device)
        {
            bool connectBl = device.GetDataByCommand("up");
            return connectBl;
        }

        public static bool Left(Device device)
        {
            bool connectBl = device.GetDataByCommand("left");
            return connectBl;
        }

        public static bool Right(Device device)
        {
            bool connectBl = device.GetDataByCommand("right");
            return connectBl;
        }

        public static bool Down(Device device)
        {
            bool connectBl = device.GetDataByCommand("down");
            return connectBl;
        }

        public static bool Stop(Device device)
        {
            bool connectBl = device.GetDataByCommand("stop");
            return connectBl;
        }

        public static bool StopView(Device device)
        {
            bool connectBl = device.GetDataByCommand("stopView");
            return connectBl;
        }

        public static bool FocusFar(Device device)
        {
            bool connectBl = device.GetDataByCommand("focusFar");
            return connectBl;
        }

        public static bool FocusNear(Device device)
        {
            bool connectBl = device.GetDataByCommand("focusNear");
            return connectBl;
        }

        public static bool FocusIn(Device device)
        {
            bool connectBl = device.GetDataByCommand("focusIn");
            return connectBl;
        }

        public static bool FocusOut(Device device)
        {
            bool connectBl = device.GetDataByCommand("focusOut");
            return connectBl;
        }
    }

}
